package com.rtx.edi.log.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rtx.edi.log.bean.EdiLog;
import com.rtx.edi.log.service.EdiLogService;
import com.rtx.edi.model.response.EdiResponse;
import com.rtx.edi.platform.tableconfig.bean.EdiColumnValueConfig;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@SuppressWarnings("all")
@Api(tags = {"edi日志"})
@RestController
@RequestMapping("/v1/edilog")
public class EdiLogController {
	
	@Autowired
	EdiLogService ediLogService;
	
    /**
     * 获取表配置
     * @return
     */
    @ApiOperation(value = "分页获取-日志", notes = "分页获取-日志")
    @PostMapping("selectEdiLogList")
    public EdiResponse selectColumnValueConfigList(@RequestBody EdiLog dto){
        Page<EdiLog> pageParam = new Page<>(dto.getPageNum(), dto.getPageSize());
        ediLogService.selectPageList(pageParam,dto);
        return EdiResponse.success().data("page",pageParam);
    }
    
    /**
     * 查询表配置
     * @return
     */
    @ApiOperation(value = "根据ID查询-日志", notes = "根据ID查询-日志")
    @PostMapping("selectEdiContentLogByLogno")
    public EdiResponse selectEdiContentLogByLogno(@RequestBody EdiLog dto){
        return EdiResponse.success().data("item",ediLogService.selectByLogno(dto));
    }

}
